import axios from "@/api/request";

const house = {
    add: "/back/house/add",
    update: "/back/house/update",
    updateStatus: "/back/house/updateStatus",
    delete: "/back/house/delete",
    findById: "/back/house/findById",
    findAll: "/back/house/findAll",
    search: "/back/house/search",
}
const houseImg = {
    add: "/back/houseImg/add",
    update: "/back/houseImg/update",
    delete: "/back/houseImg/delete",
    findById: "/back/houseImg/findById",
    findAll: "/back/houseImg/findAll",
    search: "/back/houseImg/search",
    findAllByHouseId: "/back/houseImg/findAllByHouseId",
    searchByHouseId: "/back/houseImg/searchByHouseId",
}
const houseBroker = {
    add: "/back/houseBroker/add",
    update: "/back/houseBroker/update",
    updateStatus: "/back/houseBroker/updateStatus",
    delete: "/back/houseBroker/delete",
    findById: "/back/houseBroker/findById",
    findAll: "/back/houseBroker/findAll",
    search: "/back/houseBroker/search",
}
const housePlot = {
    add: "/back/housePlot/add",
    update: "/back/housePlot/update",
    updateStatus: "/back/housePlot/updateStatus",
    delete: "/back/housePlot/delete",
    findById: "/back/housePlot/findById",
    findAll: "/back/housePlot/findAll",
    search: "/back/housePlot/search",
}
const api = {
    house_add(params) {
        return axios.post(house.add, params)
    },
    house_update(params) {
        return axios.post(house.update, params)
    },
    house_updateStatus(params) {
        return axios.get(house.updateStatus, {params})
    },
    house_delete(params) {
        return axios.delete(house.delete, {params})
    },
    house_findById(params) {
        return axios.get(house.findById, {params})
    },
    house_findAll(params) {
        return axios.get(house.findAll, {params})
    },
    house_search(params) {
        return axios.get(house.search, {params})
    },


    houseImg_add(params) {
        return axios.post(houseImg.add, params)
    },
    houseImg_update(params) {
        return axios.post(houseImg.update, params)
    },
    houseImg_delete(params) {
        return axios.delete(houseImg.delete, {params})
    },
    houseImg_findById(params) {
        return axios.get(houseImg.findById, {params})
    },
    houseImg_findAll(params) {
        return axios.get(houseImg.findAll, {params})
    },
    houseImg_search(params) {
        return axios.get(houseImg.search, {params})
    },
    houseImg_findAllByHouseId(params) {
        return axios.get(houseImg.findAllByHouseId, {params})
    },
    houseImg_searchByHouseId(params) {
        return axios.get(houseImg.searchByHouseId, {params})
    },

    houseBroker_add(params) {
        return axios.post(houseBroker.add, params)
    },
    houseBroker_update(params) {
        return axios.post(houseBroker.update, params)
    },
    houseBroker_updateStatus(params) {
        return axios.get(houseBroker.updateStatus, {params})
    },
    houseBroker_delete(params) {
        return axios.delete(houseBroker.delete, {params})
    },
    houseBroker_findById(params) {
        return axios.get(houseBroker.findById, {params})
    },
    houseBroker_findAll(params) {
        return axios.get(houseBroker.findAll, {params})
    },
    houseBroker_search(params) {
        return axios.get(houseBroker.search, {params})
    },

    housePlot_add(params) {
        return axios.post(housePlot.add, params)
    },
    housePlot_update(params) {
        return axios.post(housePlot.update, params)
    },
    housePlot_updateStatus(params) {
        return axios.get(housePlot.updateStatus, {params})
    },
    housePlot_delete(params) {
        return axios.delete(housePlot.delete, {params})
    },
    housePlot_findById(params) {
        return axios.get(housePlot.findById, {params})
    },
    housePlot_findAll(params) {
        return axios.get(housePlot.findAll, {params})
    },
    housePlot_search(params) {
        return axios.get(housePlot.search, {params})
    },


}
export default api
